package com.leyou.item.api;

import com.leyou.item.pojo.SpecGroup;
import com.leyou.item.pojo.SpecParam;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface SpecificationApi {

    /**
     * 查询所有规格参数
     * @param gid
     * @param cid
     * @param searching
     * @return
     */
    @GetMapping("/spec/params")
    List<SpecParam> queryParamList(@RequestParam(value = "gid", required = false) Long gid,
                                   @RequestParam(value = "cid", required = false) Long cid,
                                   @RequestParam(value = "searching", required = false) Boolean searching);


    /**
     * 参训规格参数组和组下的规格参数封装进specgroup
     * @param cid
     * @return
     */
    @GetMapping("/spec/group")
    List<SpecGroup> queryListByCid(@RequestParam("cid") Long cid);


}
